import request from '@/utils/request'
// 手动检测设备绑定检测
export function manuallySlideBinding(data) {
  return request({
    url: `/biz/slide/binding/manuallySlideBinding`,
    method: "post",
    data,
  });
}

// 设备对接传输数据
export function deviceAbutment(data) {
  return request({
    url: `/biz/slide/binding/deviceAbutment`,
    method: "post",
    data,
  });
}

// 获取本底列表
export function getBackgrounds(params) {
  return request({
    url: `/task/personalDosimeter/getBackgrounds`,
    method: "get",
    params,
  });
}

// 绑定本底
export function singleBindBackground(data) {
  return request({
    url: `/task/personalDosimeter/singleBindBackground`,
    method: "post",
    data,
  });
}

// 更新佩戴时间
export function updateWearingTime(data) {
  return request({
    url: `/task/personalDosimeter/updateWearingTime`,
    method: "post",
    data,
  });
}

// 修改是否显示在报告中
export function updateShowReport(resultId, showFlag) {
  return request({
    url: `/task/personalDosimeter/updateShowReport/${resultId}/${showFlag}`,
    method: "post"
  });
}

// 获取剂量计异常详情
export function getExceptionalInfo(resultId) {
  return request({
    url: `/task/personalDosimeter/getExceptionalInfo/${resultId}`,
    method: "get"
  });
}

// 更新原始数据(不留痕)
export function personalUpdateRawData(data) {
  return request({
    url: `/task/personalDosimeter/updateRawData`,
    method: "post",
    data
  });
}

// 生成报告前校验
export function personGenerateReportCheck(dosimeterId) {
  return request({
    url: `/task/personalDosimeter/generateReportCheck/${dosimeterId}`,
    method: "get"
  });
}

// 一键签发
export function oneClickIssuance(taskDosimeterId) {
  return request({
    url: `/task/personalDosimeter/oneClickIssuance/${taskDosimeterId}`,
    method: "post"
  });
}

// 删除剂量计任务数据
export function personalRemoveResult(resultId) {
  return request({
    url: `/task/personalDosimeter/removeResult/${resultId}`,
    method: "DELETE"
  });
}